package org.wangle.seckill.mq.component.seckill;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.wangle.api.properties.MQ.SecKillProperties;

public class SecKillBinding {

    @Bean
    public Binding createOrderOfSecKillBinding(){
        return BindingBuilder.bind(new Queue(SecKillProperties.secKillQueue)).to(new DirectExchange(SecKillProperties.secKillExchange)).with(SecKillProperties.secKillBindingKey);
    }

}
